/*
 * IJA2011, Board game "Clovece nezlob se"
 * grp108
 * Tomáš Mičiak,xmicia00
 * Andrej Martinák, xmarti51
 *
 */

package src.clovece;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import src.clovece.game.GameInfo;

/**
 *
 * @author Thomas
 */
public class Die extends JLabel {
    private GameInfo gameInfo = GameInfo.getGameInfoInstance();
    private int side = 0;
    
    public Die() {
        super();
    }

    public void repaintDie(int i) {
        this.setIcon(new ImageIcon(System.getProperty("user.dir")+ System.getProperty("file.separator")
                  + "lib" + System.getProperty("file.separator") + "img" + System.getProperty("file.separator") + "dice" +
                  + this.gameInfo.getGraphicMode() + i + ".png"));
        this.side = i;
        this.gameInfo.setDie(i);
    }

    public void setSide(int side) {
        this.side = side;
    }

    public int getSide() {
        return this.side;
    }
}
